home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13511 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.8 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.eiffel,comp.lang.c,comp.lang.c++,comp.object,comp.software-eng
  4. Subject: Re: Beware of "C" Hackers -- A rebuttal to Bertrand Meyer
  5. Date: 25 Mar 1996 19:14:33 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4j7gdp$cl7@solutions.solon.com>
  8. References: <1995Jul3.034108.4193@rcmcon.com> <3154A548.71FF@iadfw.net> <4j3p80INN567@keats.ugrad.cs.ubc.ca> <827765484snz@tsys.demon.co.uk>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <827765484snz@tsys.demon.co.uk>,
  12. Tom Wheeley  <tomw@tsys.demon.co.uk> wrote:
  13. >Surely you have just proved that the standard library is _not_ part of the
  14. >C language.  At the risk of seeming -pedantic, I would say that the standard
  15. >library is a part of the _standard C *implementation*_, but not a part of
  16. >the standard C *language*.
  17.  
  18. Nope.  "This International Standard specifies and establishes the
  19. interpretation of programs written in the C programming language."  What
  20. it specifies is C.
  21.  
  22. >That is why you can build the standard library within C -- you cannot write
  23. >the entire standard library using the standard library, therefore if the
  24. >standard library is a part of the C language, then the standard library is
  25. >no longer written in the C language, but only a limited subset thereof.
  26.  
  27. You cannot write the standard library in C; at least, not completely.  You
  28. absolutely *must* have some way of reading or writing that is not a part
  29. of the C language.  You also (if you wish to offer a respectable
  30. implementation) need to find some way to get or release memory, and you
  31. need a way to check on the time, and on CPU time used.  None of this
  32. can be done in C-without-libraries, the language that C would be if
  33. the standard library were not a part of it.
  34.  
  35. Implementors must write in a language which is also C, but is not the
  36. standard form; they write in what is called a freestanding evironment,
  37. one which may not have any or all of the library available, and which
  38. may require or offer special magic.
  39.  
  40. Arguably, if you look at a "freestanding implementation", you have a
  41. language which is still C, but has no standard library; on the other
  42. hand, you can write no programs in it, because it does not specify
  43. how you start a program.  (main() is only documented for hosted
  44. environments, i.e., those with libraries.)
  45.  
  46. >I hope you understood that, I half expected to end up mentioning an index of
  47. >everything that is not indexed... ;-)
  48.  
  49. Ahh, the World Wide Web.
  50.  
  51. (Actually, that's the index of indexes with no things in them.)
  52.  
  53. -s
  54. -- 
  55. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  56. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  57. FUCK the communications decency act.  Goddamned government.  [literally.]
  58. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  59.